package edu.sctu.practice.class02.luohui.test03;

/**
 * Created by asus on 2015/10/14.
 */
public class MyTime {
    private int hour;
    private int minute;
    private int second;
    public MyTime(int hour, int minute, int second) {
        this.hour = hour;
        this.minute = minute;
        this.second = second;
    }

    public void diaply(MyTime time) {
        System.out.println(time.getHour()+":"+time.getMinute()+":"+time.getSecond());
    }
    public int getHour(){
        return hour;
    }
    public void  setHour(int hour){
        this.hour=hour;

    }
    public int getMinute(){
        return minute;
    }
    public void setMinute(int minute){
        this.minute=minute;
    }
    public int getSecond(){
        return hour;
    }
    public void setSecond(int second){
        this.second=second;
    }
    public void addSecond(int sec){
        this.second=second+sec;
    }
    public void addMinute(int min){
        this.minute=minute+min;
    }
    public void addHour(int hou){
        this.hour=hour+hou;
    }
    public void subSecond(int sec){
        this.second=second-sec;
    }
    public void subMinute(int min){
        this.minute=minute-min;
    }
    public void subHour(int hou){
        this.hour=hour-hou;
    }
}
